package com.toy.core.security.userdetails;

import java.io.Serializable;

import com.toy.core.security.GrantedAuthority;

public interface UserDetail extends Serializable {

    /**
     * 获得用户账户
     * @return
     */
    String getUsername();

    /**
     * 获得用户密码
     * @return
     */
    String getPassword();
    
    /**
     * 账户过期
     * @return
     */
    boolean isAccountExpired();

    /**
     * 账户锁定
     * @return
     */
    boolean isAccountLocked();

    /**
     * 账户启用
     * @return
     */
    boolean isAccountEnabled();
    
    /**
     * 密码过期
     * @return
     */
    boolean isCredentialsExpired();
    
    GrantedAuthority[] getAuthorities();
}
